// ==UserScript==
// @name         更好的sofa/BeamAdapter文档
// @namespace    http://tampermonkey.net/
// @version      2025-04-09
// @description  优化显示
// @author       墨雨千秋/wmyqq
// @updateURL    https://gitee.com/wmyqq4577/browser-script/blob/master/better_beamadapter_doc.js
// @match        https://sofa-framework.github.io/BeamAdapter/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.io
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    document.querySelector('html').lang='zh-cn'
    document.querySelector(".contents").style.margin="0 0";
    let tables=document.querySelectorAll("table");
    let mlabels=document.querySelectorAll(".mlabel");

    function change_table_view(ele){
        for(let i=1;i<ele.children.length;i++){
            let tr=ele.children[i];
            if(tr.children.length==2 && tr.id!=''){
                tr.children[0].before(tr.children[1]);
                tr.children[0].className="memItemLeft";
                tr.children[1].className="memItemLeft";
                tr.children[1].align="left";
            }
        }
    }
    for(let i=0;i<tables.length;i++){
        if(tables[i].children[0].children[0].innerText=='Public Attributes'){
            change_table_view(tables[i].children[0]);
        }
    }
    for (let i = 0; i < mlabels.length; i++) {
        const element = mlabels[i];
        element.style="font-size:1rem"
    }
    // Your code here...
})();